<template>
  <div id="app">
    <el-container>
      <el-header style="width: 100%; height:100px; background-color: rgb(254, 194, 2); display: flex; align-items: center;">
        <div id="main_a1" style="line-height: 60px;">
          <img src="../../static/pay-img03.png" alt="Logo" style="height: 60px; vertical-align: middle; margin-right: 10px;">
          <span style="font-size: 26px; color: rgb(86, 57, 7); vertical-align: middle;font-family: '楷体';">膳食系统</span>
          </div>
        <div id="a2" style="margin-left: auto; display: flex; align-items: center;">
          <!-- <i class="el-icon-user" style="font-size: 30px; margin-right: 8px;"></i>
          <span style="color: white; font-size: 20px;background-color: red;">营业中</span> -->
          <el-avatar :size="50" :src="store.logo" @click="showStore"></el-avatar>
        </div>
      </el-header>
      <el-container>
        <el-aside width="20%" style="height: 704px; background-color: rgb(53, 55, 68);">
        <el-menu
              default-active="2"
              class="el-menu-vertical-demo"
              @open="handleOpen"
              @close="handleClose"
              background-color="rgb(53, 55, 68)"
              text-color="#fff"
              active-text-color="#ffd04b">
              <el-submenu index="1" class="b1">
                <template slot="title">
                  <i class="el-icon-platform-eleme"></i>
                   <a href="#" style="color:white;text-decoration: none;">数据统计</a>
                </template>
              </el-submenu>
              <el-submenu index="2">
                <template slot="title">
                  <i class="el-icon-goods"></i>
                   <a href="#" style="color:white;text-decoration: none;">订单管理</a>
                </template>
              </el-submenu>
              <el-submenu index="3">
                <template slot="title">
                  <i class="el-icon-tableware"></i>
                   <a href="#" style="color:white;text-decoration: none;">菜品管理</a>
                </template>
              </el-submenu>
              <el-submenu index="4">
                <template slot="title">
                  <i class="el-icon-location"></i>
                 <a href="#" style="color:white;text-decoration: none;">类别管理</a>
                </template>
              </el-submenu>
              <el-submenu index="4">
                <template slot="title">
                  <i class="el-icon-location"></i>
                 <a href="#" style="color:white;text-decoration: none;">评论管理</a>
                </template>
              </el-submenu>
            </el-menu>

        </el-aside>
        <el-main style="width: 80%; height: 704px; background-color:rgb(245, 247, 249) ;">
          <div> <router-view/></div>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  name: "Store",
  data() {
    return {
      circleUrl:"",
      store:{},//商家信息

    };
  },
  methods:{

    /**
     * 查询商家信息的方法
     */
    findStore(){
      console.log(sessionStorage.getItem("userId"))
      this.$http.get("/store/storeInfo/findStore/"+sessionStorage.getItem("userId")).then(resp=>{
      if(resp.data.code==200){
        this.store=resp.data.data
      }
      })
    }

  },
  created() {
   this.findStore()
  }
};
</script>

<style scoped>
 .b1{

 }
#app {
  margin: 0;
  padding: 0;
}

#main_a1 {
  color: rgb(86, 57, 7);
  font-size: 28px;
  margin: 20px 50px;
  font-weight: 700;
  font-family: '楷体';
}

#a2 {
  display: flex;
  align-items: center;
}
</style>
